Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'first-child' pseudo-selector test. #717

Closed
wants to merge 1 commit into from
Closed

Added 'first-child' pseudo-selector test. #717

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 28, 2012

This is pretty much just an small rewrite of the 'css-lastchild.js' feature test already present on Modernizr to allow for the detection of browser support for the :first-child pseudo-selector. I am pretty sure that every browser that supports :last-child also supports :first-child (and vice-versa), and as such including this may sound a bit redundant, but if I am using :first-child anywhere I'd rather write

.firstchild {
    /* (...) */
}
.no-firstchild {
    /* (...) */
}

than .lastchild and .no-lastchild.

Build Status

@@ -0,0 +1,7 @@
// 'first-child' pseudo-selector test.

Modernizr.addTest('firstchild', function(){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function() {

@ghost
Copy link
Author

ghost commented Sep 28, 2012

@sindresorhus: Had passed really unnoticed. :-) Fixed. Thank you very much.

@ghost
Copy link
Author

ghost commented Nov 29, 2012

@KuraFire, @paulirish: Any chances this might get merged?

@ghost ghost closed this May 10, 2013
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant